cmake_minimum_required(VERSION 2.6)

SET(CMAKE_CXX_FLAGS  "-g -pg -Wall")
SET(LINK_FLAGS "-pg -g")

SET(QT_USE_QTTEST 1)

INCLUDE_DIRECTORIES(gmock gmock/include gtest gtest/include)

SET(BINDIR ${CMAKE_INSTALL_PREFIX}/bin)
SET(LIBDIR ${CMAKE_INSTALL_PREFIX}/lib/wishmaster)
SET(SHAREDIR ${CMAKE_INSTALL_PREFIX}/share/wishmaster)

SET(tests_sources
	mockobjects/mockchanagent.cpp
	mockobjects/mockcookiestorage.cpp
	testboard.cpp
	testchanlist.cpp
	testchanmanager.cpp
	testchanwatcher.cpp
	testfilterwipe.cpp
	testmainwindowcontroller.cpp
	testpost.cpp
	testpoststyle.cpp
	testthread.cpp
	testtimestampparser.cpp
	testwhitespacewatermarkgenerator.cpp
	
	gmock/src/gmock-all.cc
	gtest/src/gtest-all.cc
	)

SET(tests_headers
	mockobjects/mockchanagent.h
	mockobjects/mockthreadstorage.h
	mockobjects/mockcookiestorage.h
	mockobjects/mocktimer.h
)

QT4_WRAP_CPP(MOC_SRCS ${tests_headers})

LINK_DIRECTORIES(${CMAKE_SOURCE_DIR}/libwm)
ADD_EXECUTABLE(tests ${tests_sources} ${MOC_SRCS} tests.cpp)
TARGET_LINK_LIBRARIES(tests ${QT_LIBRARIES} ${spelling_libs} wm cppunit)
